<?php
// +----------------------------
// | Created by PhpStorm
// +----------------------------
// | Author: YnnSon
// +----------------------------
namespace app\api\validate;

/**
 * 车辆接口验证类
 * Class ServiceValidate
 * @package app\api\validate
 */
class ServiceValidate extends BaseValidate
{
    protected $rule = [
        ['carNumber', 'require|isNotEmpty', '车牌号不存在|车牌号不能为空'],
        ['licensenumber', 'require|isNotEmpty', '驾驶证号不存在|驾驶证号不能为空'],
        ['licenseid', 'require|isNotEmpty', '档案编号不存在|档案编号不能为空'],
    ];
    // 验证场景
    protected $scene = [
        'violation' => ['carNumber'], // 违章查询
        'score'     => ['licensenumber', 'licenseid'], // 违章查询
    ];
}